import Vue from "vue";
import VueRouter from "vue-router"
import routes from "./routes.js"
import { titleController } from "../utils"
Vue.config.productionTip = false
Vue.use(VueRouter)



const router = new VueRouter({
    //路由配置
    routes,
    mode: 'history',

});
router.afterEach((to, from) => {
    if (to.meta.title) {
        titleController.setRouteTitle(to.meta.title);
    }
})
export default router;